<script>
	export default {
		onLaunch: function() {
			console.log('App Launch')
      this.isLogin()
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		},
    methods: {
      isLogin(){
        const that = this
        uni.getStorage({
          key:'tokens',
          success (res) {
            console.log(res.data);
            that.$store.commit('setUser', res.data)
          },
          fail() {
            uni.navigateTo({
              url: "/pages/login/login"
            })
          }
        })
      }
    }
	}
</script>

<style>
	/*每个页面公共css */
</style>
